package com.asp.bigdata.flink.kafka2hdfs.pojo;

import java.io.Serializable;

/**
 * 单条记录的封装
 */
public class Event implements Serializable {

    private static final long serialVersionUID = -543267340693958817L;

    /**
     *当前记录要输出的具体信息
     */
    private String value;

    /**
     *当前记录的事件时间，用于分区
     */
    private long time;


    private String type;

    public Event(String value, long time, String type) {
        this.value = value;
        this.time = time;
        this.type = type;
    }

    /**
     *数据打印到文件时会调用toString方法
     */
    @Override
    public String toString() {
        return value+ "\n";
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

}
